﻿@model  Forest.Cat.Admin.Models.Resumes.ResumeEditModel
@using Forest.Cat.Domain.Entities
@{
    ViewBag.Title = "个人信息";
    Layout = "~/Administration/Views/Shared/_JobseekerRoot.cshtml";
}
<script type="text/javascript">
    $(document).ready(function () {
        $('#regionalismList2').val($('#City2').val());
        $('#regionalismList1').val($('#City1').val());
        $('#btnSubmit').bind('click', function () {
            $('#City1').val($('#regionalismList1').val());
            $('#City2').val($('#regionalismList2').val());
        });
    });
</script>
@using (Html.BeginForm("ResumeEdit", "Resume", FormMethod.Post)) {
    <div class="Work_experience">
        <div class="Work_experience_title">
            @ViewBag.Title</div>
        <div class="Work_experience_box">
            <ul>
                <li>
                    <p>
                        简历名称</p>
                    @Html.TextBoxFor(x => x.ResumeName, new { @class = "long_input" })
                    @Html.ValidationMessageFor(x => x.ResumeName)</li>
                <li>
                    <p>
                        姓名</p>
                    @*@Model.FullName*@
                    @Html.TextBoxFor(x => x.FullName, new { @class = "long_input" }) </li>
                <li>
                    <p>
                        身份证号</p>
                    @*@Model.IDCard*@
                    @Html.TextBoxFor(x => x.IDCard, new { @class = "long_input" }) </li>
                <li>
                    <p>
                        出生日期</p>
                    <span style="color: Gray">格式:yyyy-m-d,示例:2013-1-1，2013-12-31</span>
                    @Html.TextBoxFor(x => x.BirthDateString, new { @class = "long_input" })
                    @Html.ValidationMessageFor(x => x.BirthDateString)
                </li>
                <li>
                    <p>
                        性别</p>
                    @Html.DropDownListFor(
                            x => x.Gender,
                            ViewBag.Genders as SelectList,
                            "请选择:",
                            new { @class = "long_select" })
                </li>
                <li>
                    <p>
                        目前年薪</p>
                    @Html.DropDownListFor(
                            x => x.CurrentRevenue,
                            ViewBag.SalaryRanges as SelectList,
                            "请选择:",
                            new { @class = "long_select" })
                </li>
                <li>
                    <p>
                        工作经验</p>
                    @Html.DropDownListFor(
                      x => x.YearsOfExperience,
                      ViewBag.YearsOfExperiences as SelectList,
                             "请选择:",
                            new { @class = "long_select" })
                </li>
                <li>
                    <p>
                        最高学历</p>
                    @Html.DropDownListFor(
                             x => x.EducationLevel,
                             ViewBag.EducationLevels as SelectList,
                             "请选择:",
                            new { @class = "long_select" })
                </li>
                <li>
                    <p>
                        户籍所在地</p>
                    @{var index1 = 0;}
                    <select id="regionalismList1">
                        @foreach (var item in ViewBag.RegionalismList) {
                            if (index1 == 0) {
                            <option value="">请选择:</option>    
                            }
                            index1++;
                            <optgroup label="@item.Name">
                                <!--循环显示子类-->
                                @foreach (var subItem in (ViewBag.SubRegionalismList as List<Lov>).Where(x => x.ParentId.Value.Equals(item.Id))) {
                                    <option value="@subItem.Value">@subItem.Name</option>
                                }
                            </optgroup>
                        }
                    </select>
                </li>
                <li>
                    <p>
                        居住地</p>
                    @{var index2 = 0;}
                    <select id="regionalismList2">
                        @foreach (var item in ViewBag.RegionalismList) {
                            if (index2 == 0) {
                            <option value="">请选择:</option>    
                            }
                            index2++;
                            <optgroup label="@item.Name">
                                <!--循环显示子类-->
                                @foreach (var subItem in (ViewBag.SubRegionalismList as List<Lov>).Where(x => x.ParentId.Value.Equals(item.Id))) {
                                    <option value="@subItem.Value">@subItem.Name</option>
                                }
                            </optgroup>
                        }
                    </select>
                </li>
                <li>
                    <p>
                        详细地址</p>
                    @Html.TextBoxFor(x => x.Street2, new { @class = "long_input" })
                </li>
                <li>
                    <p>
                        邮编</p>
                    @Html.TextBoxFor(x => x.PostalCode, new { @class = "long_input" })
                </li>
                <li>
                    <p>
                        最近公交线路</p>
                    @Html.TextBoxFor(x => x.BusLines, new { @class = "long_input" })
                </li>
                <li>
                    <p>
                        语言能力</p>
                    @Html.DropDownListFor(
                            x => x.Language1,
                                     (SelectList)ViewBag.Language1s,
                            "语言:",
                            new { @class = "long_select" })
                    @Html.DropDownListFor(
                            x => x.Level1,
                                     (SelectList)ViewBag.Level1s,
                            "程度:",
                            new { @class = "long_select" })
                </li>
                <li>
                    @Html.DropDownListFor(
                             x => x.Language2,
                                     (SelectList)ViewBag.Language2s,
                            "语言:",
                            new { @class = "long_select" })
                    @Html.DropDownListFor(
                            x => x.Level2,
                                     (SelectList)ViewBag.Level2s,
                            "程度:",
                            new { @class = "long_select" })
                </li>
                <li>
                    <p>
                        固定电话</p>
                    @Html.TextBoxFor(x => x.Tel, new { @class = "long_input" })
                </li>
                <li>
                    <p>
                        移动电话</p>
                    @Html.TextBoxFor(x => x.Mobile, new { @class = "long_input" })
                    @Html.ValidationMessageFor(x => x.Mobile)
                </li>
                <li>
                    <p>
                        电子邮件</p>@Html.TextBoxFor(x => x.Email, new { @class = "long_input" })</li>
                <li>
                    <p>
                        个人网站</p>@Html.TextBoxFor(x => x.PersonalSite, new { @class = "long_input" })</li>
                <li>
                    <p>
                        公开设置</p>
                    @Html.DropDownListFor(x=>x.PrivacyStatus, ViewBag.PrivacyStatus as SelectList, "请选择",new { @class = "long_select" })</li>
            </ul>
            <div class="workEdit_btns">
                @Html.HiddenFor(x => x.Id)
                @Html.HiddenFor(x => x.City1)
                @Html.HiddenFor(x => x.City2)
                <input id="btnSubmit" type="image" src="../../../Administration/Content/images/icons-save-64-19.png" />或
                @Html.ActionLink("取消", "ResumeOverview", "Resume", new { @Model.Id }, null)</div>
        </div>
    </div>
}
